<%@ page import="com.atguigu.pojo.SysUser" %><%--
  Created by IntelliJ IDEA.
  User: 22307
  Date: 2025/9/22
  Time: 09:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String name="tom";
    SysUser sysUser = new SysUser();
    sysUser.setUsername("liudadan");
    String[] arr = {"刘大胆","超级无敌刘大胆"};
    //将四个数据保存到请求域中
    request.setAttribute("sysname", name);

    request.setAttribute("sysuser", sysUser);
    request.setAttribute("strs", arr);
    //jsp内嵌对象
    request.setAttribute("reqkey","request的数据");
    session.setAttribute("sessionkey","session的数据");
    application.setAttribute("applicationkey","application的数据");
%>
<h1>${sysname}</h1>
<h1>${sysuser}</h1>
<h1>${arr[0]},${arr[1]}</h1>
<h1>${reqkey}</h1>
<h1>${sessionkey}</h1>
<h1>${applicationkey}</h1>
</body>
</html>
